<?php

class Application_Form_UserSettings extends Zend_Form
{

    public function init()
    {
        $firstname = new Zend_Form_Element_Text('firstname');
        $firstname->setLabel('First Name:')
                  ->setRequired(false);
                    
        $lastname = new Zend_Form_Element_Text('lastname');
        $lastname->setLabel('Last Name:')
                  ->setRequired(false);
                    
        $email = new Zend_Form_Element_Text('email');
        $email->setLabel('Email: ')
              ->setRequired(false);
                
        $newpassword = new Zend_Form_Element_Password('newPassword');
        $newpassword->setLabel('New Password: ')
                 ->setRequired(false);
                
        $confirmPassword = new Zend_Form_Element_Password('confirmPassword');
        $confirmPassword->setLabel('Confirm New Password: ')
                        ->setRequired(false);
                
        $save = new Zend_Form_Element_Submit('save');
        $save->setLabel('Save Settings')
                ->setIgnore(true);
                
        $this->addElements(array(
                        $firstname,
                        $lastname,
                        $email,
                        $newpassword,
                        $confirmPassword,
                        $save
                        ));   
                        
                        
                                        
       	$this->setElementDecorators(array(
        					'ViewHelper',
        					//'Errors',
        					'Label',
        					array(array('row'=>'HtmlTag'), array('tag'=>'div', 'class'=>'input'))
        ));

        
        $save->setDecorators(array('ViewHelper',
        							array(array('row'=>'HtmlTag'), array('tag'=>'div', 'class'=>'submit'))
        						));
        					
        $this->setAttrib('id', 'settings-form');
		$this->setDecorators(array(
						'FormElements',
						'Form'
						));        
    }


}

